home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 1810 / 1810.xpi / chrome / showcase.jar / content / settings / pref-thumbnails.js < prev    next >
Text File  |  2010-01-17  |  2KB  |  42 lines

  1. const CONTEXTUALACTION_PREFIX = "contextualAction";
  2.  
  3. function thumbnailPrefInit() {
  4.   // Check all enable/disable dependancies
  5.   thumbnailShowLabelsChanged();
  6.   thumbnailAnimationChanged();
  7.   paintAfterLoadedChanged();
  8.   updateThumbnailWhenContentChangesChanged();
  9. }
  10.  
  11. function contextualActionsChanged(el) {
  12.   if (el.attrName == "value") {
  13.     document.getElementById("paneThumbnails").userChangedValue(document.getElementById("contextualActions"));
  14.   }
  15. }
  16.  
  17. function thumbnailShowLabelsChanged() {
  18.   var thumbnailShowLabelsCheckbox = document.getElementById("thumbnailShowLabels");
  19.   document.getElementById("thumbnailLabelStyleLabel").disabled = !thumbnailShowLabelsCheckbox .checked;
  20.   document.getElementById("thumbnailLabelStyleAction").disabled = !thumbnailShowLabelsCheckbox .checked;
  21. }
  22.  
  23. function thumbnailAnimationChanged() {
  24.   var thumbnailAnimationCheckbox = document.getElementById("thumbnailAnimation");
  25.   document.getElementById("thumbnailActiveSizeLabel").disabled = !thumbnailAnimationCheckbox.checked;
  26.   document.getElementById("thumbnailActiveSizeSymbolLabel").disabled = !thumbnailAnimationCheckbox.checked;
  27.   document.getElementById("thumbnailActiveSize").disabled = !thumbnailAnimationCheckbox.checked;
  28.   document.getElementById("animationFramesLabel").disabled = !thumbnailAnimationCheckbox.checked;
  29.   document.getElementById("animationFrames").disabled = !thumbnailAnimationCheckbox.checked;
  30. }
  31.  
  32. function paintAfterLoadedChanged() {
  33.   var paintThumbnailsAfterLoadingCheckbox = document.getElementById("paintThumbnailsAfterLoading");
  34.   document.getElementById("paintSelectedTabsFirst").disabled = !paintThumbnailsAfterLoadingCheckbox.checked;
  35. }
  36.  
  37. function updateThumbnailWhenContentChangesChanged() {
  38.   var updateThumbnailWhenContentChangesCheckbox = document.getElementById("updateThumbnailWhenContentChanges");
  39.   document.getElementById("limitContentChangeUpdates").disabled = !updateThumbnailWhenContentChangesCheckbox.checked;
  40.   document.getElementById("limitContentChangeUpdatesTime").disabled = !updateThumbnailWhenContentChangesCheckbox.checked;
  41.   document.getElementById("contentUpdatesMillisecondsLabel").disabled = !updateThumbnailWhenContentChangesCheckbox.checked;
  42. }